<?php
namespace soa\mp\order;

use soa\client;

class courierUserOrder  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//添加
	public function insert($courierId,$shipperId,$shippingId,$packageInfo = "其他",$packageWeight = 1){
		return $this->post("api/order/courierUserOrder/insert",compact('courierId','shipperId','shippingId','packageInfo','packageWeight'));
	}

	//根据快递员id查询
	public function getByCourierId($courierId,$limit = [],$orderBy = "id DESC"){
		return $this->post("api/order/courierUserOrder/getByCourierId",compact('courierId','limit','orderBy'));
	}

	//根据订单id查询
	public function getById($id){
		return $this->post("api/order/courierUserOrder/getById",compact('id'));
	}

	//根据发件人姓名查询
	public function getByName($courierId,$shipperName,$limit = [],$orderBy = "id DESC"){
		return $this->post("api/order/courierUserOrder/getByName",compact('courierId','shipperName','limit','orderBy'));
	}

	//根据发件人联系方式查询
	public function getByMobile($courierId,$shipperMobile,$limit = [],$orderBy = "id DESC"){
		return $this->post("api/order/courierUserOrder/getByMobile",compact('courierId','shipperMobile','limit','orderBy'));
	}

	//同步订单
	public function syncOrder($orderNo){
		return $this->post("api/order/courierUserOrder/syncOrder",compact('orderNo'));
	}
}